a = int(input("请输入一个四位数："))

a = str(a)
#  反向输出
a = a[::-1]
a = int(a)
print(a)
